fix: remove default value prefill from prompt inputs#416
Conversation
prompt_toolkit's `default` parameter not only sets the fallback value when Enter is pressed, but also prefills the input field. This caused the input to show "Choice [1]: 1" instead of "Choice [1]: " which made it confusing to enter different values. Changed to use empty prompt with `or` fallback for cleaner UX.
|
Hi @aidandaly24 @jariy17, friendly ping! 👋 I know you're busy, but I'd appreciate it if you could take a look at this when you have a moment. This bug fix PR has been open for over a month now. It's a simple UX improvement that removes the confusing prefilled default values in prompt inputs. I noticed the CI ( The change is minimal (just 2 lines) and has been manually tested. Would appreciate your review! Thanks so much! 🙏 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #416 +/- ##
=======================================
Coverage ? 86.12%
=======================================
Files ? 122
Lines ? 11716
Branches ? 1806
=======================================
Hits ? 10090
Misses ? 1197
Partials ? 429
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @minorun365, we are rerunning your workflow. Once it's passes, I'll review the PR. |
Summary
Choice [1]: 1instead ofChoice [1]:)defaultparameter inprompt_toolkit.prompt()both sets the fallback value AND prefills the input field, which is confusing UXChanges
Changed 2 occurrences in
_configure_impl.py:Before:
After:
This keeps the default behavior (pressing Enter uses the default value) while showing a clean empty input field.
Test plan
agentcore configureand verify deployment type selection showsChoice [1]:with empty input